/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package phonebook;
/**
 * 
 * @author Nikos
 */
//import java.util.Scanner;
//akoma mia allagi ..
import java.util.* ;
public class Phonebook {
        //fields Πεδία
    public static class dedomena {
        private String onoma;
        private String eponymo;
        private String thlefono;
    //constructor δημιουργός
    public dedomena()
    {
    }
    public dedomena(String onoma,String eponymo,String thlefono)
    {
        //populate the fields
        this.onoma=onoma;
        this.eponymo=eponymo;
        this.thlefono=thlefono;
    }
    //methods
    public void displayeggrafi()
    {
        System.out.println("Όνομα    :"+onoma);
        System.out.println("Επώνυμο  :"+eponymo);
        System.out.println("Τηλέφωνο :"+thlefono);
    }
    public dedomena eisagogi(){
        Scanner input = new Scanner(System.in);
        //String onoma,eponymo,thlefono;
        System.out.print("Δώσε όνομα :");
        onoma = input.nextLine();
        System.out.print("Δώσε επώνυμο :");
        eponymo = input.nextLine();
        System.out.print("Δώσε τηλέφωνο : ");
        thlefono = input.nextLine();
        return new dedomena(onoma,eponymo,thlefono);
    }
           
    }
      /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        dedomena [] pinakas = new dedomena[2];
        dedomena x = new dedomena();
        int i;
        for (i=0;i<2;i++){
        pinakas[i]=x.eisagogi();
         }
        for (i=0;i<2;i++){
        pinakas[i].displayeggrafi();  
        //x.displayeggrafi();
        }
        
        System.out.println ("Current date and time: " + new Date ()) ;
        //firstdedomena = new dedomena.eisagogi();
    }  
    }
